package itcast.domain;


public class CarBean {
	private int shopid;//商品id
	private int userid;//用户id
	private String shopnames;//商品名
	private float prices;//商品价格
	private String urls;//商品图片
	private int counts;//商品数量
	private int totalcount;//商品总件数
	private float subtotal=prices*counts;//商品小计
	public int getShopid() {
		return shopid;
	}
	public void setShopid(int shopid) {
		this.shopid = shopid;
	}
	public int getUserid() {
		return userid;
	}
	public void setUserid(int userid) {
		this.userid = userid;
	}
	public String getShopnames() {
		return shopnames;
	}
	public void setShopnames(String shopnames) {
		this.shopnames = shopnames;
	}
	public float getPrices() {
		return prices;
	}
	public void setPrices(float prices) {
		this.prices = prices;
	}
	public String getUrls() {
		return urls;
	}
	public void setUrls(String urls) {
		this.urls = urls;
	}
	public int getCounts() {
		return counts;
	}
	public void setCounts(int counts) {
		this.counts = counts;
	}
	public int getTotalcount() {
		return totalcount;
	}
	public void setTotalcount(int totalcount) {
		this.totalcount = totalcount;
	}
	public float getSubtotal() {
		return subtotal= prices*counts;
	}
	public void setSubtotal(float subtotal) {
		this.subtotal  = subtotal;
	}
	public CarBean(int shopid, int userid, String shopnames, float prices, String urls, int counts, int totalcount,
			float subtotal) {
		super();
		this.shopid = shopid;
		this.userid = userid;
		this.shopnames = shopnames;
		this.prices = prices;
		this.urls = urls;
		this.counts = counts;
		this.totalcount = totalcount;
		this.subtotal = subtotal;
	}
	public CarBean() {
		super();
	}
	@Override
	public String toString() {
		return "CarBean [shopid=" + shopid + ", userid=" + userid + ", shopnames=" + shopnames + ", prices=" + prices
				+ ", urls=" + urls + ", counts=" + counts + ", totalcount=" + totalcount + ", subtotal=" + subtotal
				+ "]";
	}
	
	

	
	
	
		
}
